﻿@model KRM.Core.sp_OrderHistory_Result

@{
    ViewBag.Title = "Send Return Feed";
    Layout = "~/Views/Shared/_PopupLayout.cshtml";
    KRM.Core.tblTradeCustomerOrderReturn orderReturn = ViewBag.OrderReturn;
}
<div style="padding: 10px">
    @Html.Partial("Partial/_MessageResult")
    <form method="POST" action="/trade/SendReturnFeed">
        <input type="hidden" name="tradeAccountNumber" value="@Model.TradeAccNumber"/>
        <input type="hidden" name="OrderID" value="@Model.OrderID"/>
        <div class="row-fluid">
            <div class="span2">OrderRef</div>
            <div class="span4"><input type="text" name="OrderRef" class="input-block-level" value="@Model.OrderRef"/></div>
            <div class="span2">Trade OrderRef</div>
            <div class="span4"><input type="text" name="OrderRef" class="input-block-level" value="@Model.TradeOrderRef"/></div>
        </div>
        <div class="row-fluid">
            <div class="span2">Order Value</div>
            <div class="span4"><input type="text" name="OrderValue" class="input-block-level" value="@((Model.ItemPrice * Model.Qty).ToString("#.##"))"/></div>
            <div class="span2">Refund Amound(*)</div>
            <div class="span4"><input type="text" name="RefundAmound" class="input-block-level" value="@(orderReturn==null?"0":((Decimal)orderReturn.RefundAmount).ToString("#.##"))"/></div>
        </div>              
         
        <div class="row-fluid">
            <div class="span2">Primary Reason</div>
            <div class="span10">
                @Html.DropDownList("PrimaryReasonId",null,new {@class="input-block-level"})
            </div>
        </div> 
        <div class="row-fluid"> <div class="span2">Refund Amound(*)</div>
            <div class="span10">
                <textarea rows="5" name="Comments" class="input-block-level" required="required">
            @(orderReturn==null?"":orderReturn.Comments)
            </textarea>
            </div>
        </div>  
        <div class="row-fluid">
            <div class="span6"></div>
            <div class="span6">
                <button type="submit" class="btn btn-primary">Send</button>
                <button type="reset" class="btn ">Refresh</button>
                <button class="btn" onclick=" javascript:window.close(); ">Cancel</button>
            </div>
        </div> 
    </form>
</div>

